﻿using System;
using WinFormClient.ServiceReference1;
namespace WinFormClient
{
    interface IViewController
    {
        void AddTopic(string topic,int groupid = -1);
        void DeleteTopic(int topicid, int groupid = -1);
        void AddReply(int topicid, string msg);
        void Exit();
        void FetchGroups();
        void FetchReplies(int topicid, int lastmsgs);
        //void FetchReplies(int topicid, int page = 0);
        void FetchTopics(int groupid, int page);
        void FetchUserInfo();
        event EventHandler FinishedLoadGroup;
        event EventHandler FinishedLoadReplies;
        event EventHandler FinishedLoadTopic;
        event EventHandler FinishedLoadUserInfo;
        //event EventHandler LoginSuccess;
        //event EventHandler SignUpSuccess;
        event EventHandler ShowErrorMsg;
        LoginState Login(string username, string password);
        AssignState SignUp(string username, string password);
    }
}
